//
//  ViewController.m
//  swiftUI1211
//
//  Created by hua on 2024/12/11.
//

#import "ViewController.h"
#import "swiftUI1211-Swift.h"
@interface ViewController ()
@property (nonatomic, strong) UIButton *useBtn;///useBtn


@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self.view addSubview:self.useBtn];
}
#pragma mark - click
-(void)useBtnClick{
    UIViewController *vc = [[TestSwiftUIViewManage new] makeManageTestSwiftUIView];
    vc.hidesBottomBarWhenPushed = YES;
    [vc setModalPresentationStyle:UIModalPresentationFullScreen];
    [self presentViewController:vc animated:YES completion:nil];

}
- (UIButton *)useBtn{
    if (!_useBtn) {
        _useBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        _useBtn.frame = CGRectMake(100, 100, 100, 40);
        [_useBtn setTitle:@"swiftUI" forState:UIControlStateNormal];
        [_useBtn setTitleColor:[UIColor systemGreenColor] forState:UIControlStateNormal];
        _useBtn.titleLabel.font = [UIFont systemFontOfSize:14];
        [_useBtn addTarget:self action:@selector(useBtnClick) forControlEvents:UIControlEventTouchUpInside];
    }
    return _useBtn;
}
@end
